
#include "stdafx.h"
#include "agenda_html_view.h"
#include "agenda_main_page.h"

#include "iRingTray.h"


BEGIN_DISPATCH_MAP(CAgendaHtmlView, CHtmlViewBase)
	DISP_FUNCTION(CAgendaHtmlView, "addSchedule", OnAddSchedule, VT_BSTR, VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR)
	DISP_FUNCTION(CAgendaHtmlView, "delSchedule", OnDelSchedule, VT_I4, VTS_BSTR)


END_DISPATCH_MAP()

CAgendaHtmlView::CAgendaHtmlView()
{

}


BSTR CAgendaHtmlView::OnAddSchedule( BSTR, BSTR, BSTR, BSTR )
{
	CString strScheduleId;

	return strScheduleId.AllocSysString();
}


int CAgendaHtmlView::OnDelSchedule( BSTR bstrScheduleId )
{
	CString strScheduleId( bstrScheduleId );
	return AddScheduleOk;
}

void CAgendaHtmlView::OnCreate()
{
	CString strRelativePath = theApp.GetSettings().get( L"relative" );
	SetRelative( strRelativePath );
	SetResource( L"ROOT" );
	OpenPage( CHtmlPageManager::CreatePage<AgendaMainPage>() );
}